<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>键盘事件</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <!--鼠标事件：keydown，keyup-->
    <div>
        <input type="text" placeholder="按下回车提示输入" @keyup.enter="showInfo">
        <input type="text" placeholder="按下大小写转换按钮" @keyup.caps-lock="showInfo">
        <!--大小写转换按钮需要拆开来写-->
    </div>
</body>

<script>
    new Vue({
        el:'#root',
        data:{
          
        },
        methods:{
            shoeInfo(e){
                if(e.keycode!=13) return

            }
        }
    })
</script>

</html>